Technotes


Maximum Number of Resources in a File



Technote TB 18July 1987



Revised by: March 1988
Written by: Cameron Birse July 1987

This note describes the limitation of the number of resources in a single resource file.



There is a limit to the number of the resources in a single resource file. This limitation is imposed by the resource map. There are two bytes at the end of the resource map which are the offset from the beginning of the resource map to the beginning of the resource names list. If there is only one type of resource, then the overhead, from the beginning of the resource map to the beginning of the reference list, is 38 bytes. Since the offset is a two byte value, and is a signed number, its highest possible value is 32767. This is the limitation. If you subtract 38 bytes for the overhead, and divide the difference by 12 (the number of bytes for each reference) you get about 2727.4--the limit to the number of resources in a single file is 2727.

The Resource Manager was not intended to manage large numbers of resources, and as a result, its performance is particularly bad with many resources. Because of these restrictions, we recommend that developers avoid using the Resource Manager as a data base tool.


Further Reference:




Technotes
Previous Technote | Contents | Next Technote